
<form id="add-form" class="form-horizontal col-sm-12" role="form" data-toggle="validator" method="POST" action="">
	{:token()}
	<input type="hidden" name="row[id]" value="{$row.id}">
	<div class="form-group">
		<div class="col-xs-12 col-sm-10">
			<div class="form-group col-sm-10">
				<label>解决结果:</label>

				{:build_radios('row[mobile_result]', ['1'=>__('已解决'), '9'=>__('未解决')])}
			</div>
		</div>
		<div class="col-xs-12 col-sm-10">
			<div class="form-group col-sm-10">
				<label>是否发送配件:</label>
				<label><input style="width: 30px;margin-top: 6px"
							  name="row[is_part]" type="radio" value="1"/>是</label>
				<label><input style="width: 30px;margin-top: 6px"
							  name="row[is_part]" type="radio" value="0"/>否</label>

			</div>
		</div>

		<div class="col-xs-12 col-sm-12" id="use_parts">
			<div class="form-group col-sm-12">
				<dl class="fieldlist" data-name="row[use_parts]" data-template="parttpl">
					<dd>
						<label>选择配件:</label><a href="javascript:;" class="btn btn-sm btn-success btn-append"><i
							class="fa fa-plus"></i> 选择配件</a>
					</dd>
					<textarea name="row[use_parts]" class="form-control hide" cols="30" rows="5"></textarea>
				</dl>
			</div>
		</div>
		<div class="col-xs-12 col-sm-10">
			<div class="form-group col-sm-10">
				<label>备注:</label>
				<textarea class="form-control" rows="3" name="row[desc]" placeholder="备注"></textarea>
			</div>
		</div>

	</div>

	<div class="form-group layer-footer">
		<label class="control-label col-xs-12 col-sm-2"></label>
		<div class="col-xs-12 col-sm-8">
			<button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
			<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
		</div>
	</div>
</form>

<!--定义模板-->
<script type="text/html" id="parttpl">
	<dd>
		<div class="form-inline" style="margin-bottom:20px;display: flex;">

			<span>配件名称:<input type="text" data-source="qingdongams/common/getParts"
							  class="form-control parts selectpage" name="row[<%=name%>][<%=index%>][id]"
							  data-field="name" data-primary-key="id" style="width: 300px;"
							  value="<%=row['id']%>"/></span>
			<span  style="margin-left: 10px">数量:<input type="number" name="row[<%=name%>][<%=index%>][number]"
													   class="form-control number" value="<%=row['number']%>"
													   style="width:80px;"></span>

			<span style="margin-left: 10px"><span class="btn btn-sm btn-danger btn-remove"><i
					class="fa fa-times"></i></span> <span class="btn btn-sm btn-primary btn-dragsort"><i
					class="fa fa-arrows"></i></span></span>
		</div>
	</dd>
</script>
